const axios = require('axios');

async function testComment() {
  try {
    console.log('🧪 测试评论API...');
    
    const response = await axios.post('http://localhost:3000/api/dynamic/comment', {
      userId: 'user1',
      dynamicId: 'd1',
      content: '这是一条测试评论'
    });
    
    console.log('✅ 评论成功:', response.data);
  } catch (error) {
    console.error('❌ 评论失败:', error.response?.data || error.message);
  }
}

testComment(); 